< previous page page_130 next page >

Page 130
e10a6a0a59f035e870d90cca05b85fce.gif
            ' Move on to the next character.
            avail = avail - needed
            chnum = chnum + 1
            If chnum > Len(txt) Then Exit Sub
        Loop
        x1 = x2
        y1 = y2
    Next pt
End Sub
Example program Spiral, shown in Figure 4.8, uses the CurveText subroutine to draw text along a spiral path.
You can write similar subroutines for printing text along other curves. For example, you could write routines to draw text along a circle or sine wave. Example program CurveTxt, shown in Figure 4.9, uses the CurveText subroutine to draw text along several curves. It also uses the CircleText subroutine to draw text along circular paths.
Notice that text printed by program CurveTxt on the insides of curves looks somewhat crowded, and text printed on the outsides of curves looks more widely spaced. This may be a problem when a path curves too suddenly. In that case, there may be large gaps between characters, or characters may overlap. The sharp curves in the rectangle cause large gaps between adjacent characters.
Notice also that the text generally looks a bit jagged. Characters look a bit rough when they are tilted and displayed on a computer monitor. Most look much better when they are rotated by an angle that is a multiple of 45 degrees, and they look best of all when rotated by a multiple of 90 degrees.
0130-01.jpg
Figure 4.8
Example program Spiral draws text along curves and circles.

 
< previous page page_130 next page >